<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<title>永鑫评估系统</title>
	<style>
		body {
			margin: 0;
			padding: 0;
			font-family: "微软雅黑";
		}

		.dtitle {
			background-color: #009688;
			color: white;
			width: 100%;
			font-size: 20px;
			height: 54px;
			line-height: 54px;
		}

		.divname {
			font-weight: bold;
			font-size: 22px;
		}

		.spantag {
			margin: 5px;
			width: 100px;
			color: white;
			background-color: #e84d67;
			padding-left: 5px;
			padding-right: 5px;
			padding-top: 2px;
			padding-bottom: 2px;
			border-radius: 2px;
			font-size: 12px;
		}

		.btn {
			margin: 20px;
			height: 50px;
			font-size: 18px;
			padding: 8px 40px;
			background-color: #28caad;
			border-radius: 25px;
			border: none;
			color: white;
			font-weight: 400;
			text-decoration: none;
			outline: none;
		}

		.weixin-tip {
			display: none;
			position: fixed;
			left: 0;
			top: 0;
			bottom: 0;
			background: rgba(0, 0, 0, 0.7);
			filter: alpha(opacity=80);
			height: 100%;
			width: 100%;
			z-index: 100;
		}


		.divweixin-tip {
			width: 300px;
			border-radius: 10px;
			margin-top: 60px;
			padding: 10px;
			color: #FFFFFF;
			margin-left: auto;
			margin-right: auto;
			border: 1.5px dashed #FFFFFF;
		}

		.imgweixin-tip {
			top: 4px;
			right: 14px;
			position: fixed;
			width: 40px;
			height: 40px;
		}
	</style>
</head>

<body onload="load()" style="text-align: center;">
	<div class="dtitle">永鑫评估系统</div>
	<p>
		<img style="margin-top: 20px;width: 100px;border-radius: 100px;" src="imgs/logo.png" />
	</p>

	<div class="divname">
		<img src="imgs/logo.png" style="width: 20px;" />永鑫评估系统 </div>
	<div>
		<span class="spantag">android版</span>
	</div>

	<p>
		<img class="img" style="margin-top: 20px;width:180px;height:180px" src="imgs/appcode.png"
		/>
	</p>
	<button id="btndownload" class="btn">安卓用户下载</button>
	<p style="margin-top: 10px;">如果您正在使用微信打开本页面
		<br/>请点击右上角选择用浏览器打开</p>
	<div id="divweixin-tip" class="weixin-tip">
		<img class="imgweixin-tip" src="imgs/right_top.png" />
		<div class="divweixin-tip">
			请点击右上角选择用浏览器打开
		</div>

	</div>

	<script src="//cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js" ></script>
</body>
<script>
	var u = navigator.userAgent;
	var isIOS = u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端		
	function isWeiXin() {
		var ua = window.navigator.userAgent.toLowerCase();
		if (ua.match(/MicroMessenger/i) == 'micromessenger') {
			return true;
		} else {
			return false;
		}
	}

	function load() {
		if (isWeiXin()) {
			document.getElementById("divweixin-tip").style.display = "block";
		} else {
			document.getElementById("divweixin-tip").style.display = "none";
		}
	}


	document.getElementById("btndownload").onclick = function () {
		if (isWeiXin()) {
			alert("请点击右上角选择用浏览器打开");
		} else {
		 $.get("http://123.56.7.35:8001/api/Data/GetAppVersion",function(data){
			window.location.href = data.DownloadUrl
		 })
		}
	};
</script>

</html>
